/*
 * @Author       : NaN 353362604@qq.com
 * @Date         : 2023-05-04 09:50:21
 * @LastEditTime : 2023-07-11 08:26:06
 * @LastEditors  : NaN 353362604@qq.com
 * @FilePath     : \AdminStration\src\Common\Router\MenuNav\FirstLevel\Api.jsx
 * @Description  :
 */
import { API_LIST } from '../../../Api/Api'
import { commonTableList, InputModal } from '../Common/common'
import { GetSystemLogNameList } from '../Common/Conversion'

export const SystemLog = async ({ url, OptionsEvent, ClientData, Permission, actionRef }) => {
    const { TableName, FullName } = await GetSystemLogNameList()
    console.log(FullName)
    let data = {
        pageSize: 10,
        params: { pageIndex: 1 },
        get: API_LIST()[`get${url}List`],
        added: `pos${url}`,
        modify: `put${url}`,
        delete: `del${url}`,
        columns: [
            commonTableList.uuid,
            {
                ...commonTableList.fullName,
                title: '菜单名称',
                options: FullName,
                renderFormItem: ({ originProps }) => <InputModal options={originProps.options} />,
            },
            {
                ...commonTableList.tableName,
                title: '模块名称',
                width: 240,
                options: TableName,
                renderFormItem: ({ originProps }) => <InputModal options={originProps.options} />,
            },
            { ...commonTableList.remark, title: '操作内容', width: 400, hideInSearch: true },
            { ...commonTableList.createUserName, title: '操作人员' },
            { ...commonTableList.createTime, title: '操作日期' },
            commonTableList.BeginDate,
            commonTableList.EndDate,
        ],
    }

    return data
}
